function showsbtext(id,index) {
var bookmarktext=document.getElementById(id);
var sbValues= new Array();
  sbValues[0] = 'Bookmark:';
  sbValues[1] = 'Add to <strong>Digg</strong>';
  sbValues[2] = 'Add to <strong>Delicious</strong>';
  sbValues[3] = 'Add to <strong>Blinklist</strong>';
  sbValues[4] = 'Add to <strong>Yahoo Web</strong>';
  sbValues[5] = 'Add to <strong>Netvouz</strong>';
  sbValues[6] = 'Add to <strong>Ma.gnolia</strong>';
  sbValues[7] = 'Add to <strong>Fark</strong>';
  sbValues[8] = 'Add to <strong>Furl</strong>';
  sbValues[9] = 'Add to <strong>Technorati</strong>';
  sbValues[10] = 'Add to <strong>Simpy</strong>';
  sbValues[11] = 'Add to <strong>Spurl</strong>';
  sbValues[12] = 'Add to <strong>Newsvine</strong>';
  sbValues[13] = 'Add to <strong>Blinkbits</strong>';
  sbValues[14] = 'Add to <strong>Smarkings</strong>';
  sbValues[15] = 'Add to <strong>Segnalo</strong>';
  sbValues[16] = 'Add to <strong>De.lirio.us</strong>';
  sbValues[17] = 'Add to <strong>Reddit</strong>';
  sbValues[18] = 'Add to <strong>Wists</strong>';
  sbValues[19] = 'Add to <strong>Google</strong>';
document.getElementById(bookmarktext.id).innerHTML = sbValues[index];
}


document.getElementsByClassName = function(clsName){
    var retVal = new Array();
    var elements = document.getElementsByTagName("*");
    for(var i = 0;i < elements.length;i++){
        if(elements[i].className.indexOf(" ") >= 0){
            var classes = elements[i].className.split(" ");
            for(var j = 0;j < classes.length;j++){
                if(classes[j] == clsName)
                    retVal.push(elements[i]);
            }
        }
        else if(elements[i].className == clsName)
            retVal.push(elements[i]);
    }
    return retVal;
}

function addSmiley(dummy)
{
  var d = [], i=0, def = ['post-body','entry-content', '#comments p', '#comments-holder', 'comment-body'];

  for(i=0;i<def.length;i++)
  {
	var content = document.getElementsByClassName(def[i]);
	for(var j=0;j<content.length;j++)
		d.push(content[j]);
  }

  for(i=0;i<arguments.length;i++)
  {
	var content = document.getElementsByClassName(arguments[i]);
	for(var m=0;m<content.length;m++)
		d.push(content[m]);
  }

  for(var i=0;i<d.length;i++)
  {
     d[i].innerHTML = d[i].innerHTML.replace (/\/gakmau/ig,"<img style='border: 0; padding:0'  src='http://1.bp.blogspot.com/-BCPF42K_yPM/UYz0nHN7jiI/AAAAAAAABEw/5vb0StiQqdc/s1600/gakmau.gif' height='16'/>")
     d[i].innerHTML = d[i].innerHTML.replace (/\/hai/ig,"<img style='border: 0; padding:0' src='http://3.bp.blogspot.com/-nhto1COboTs/UYz0qvIW-hI/AAAAAAAABE0/3e3uB88M7pk/s1600/hai.gif' height='16'/>")
     d[i].innerHTML = d[i].innerHTML.replace (/\/ketawa/ig,"<img style='border: 0; padding:0'  src='http://4.bp.blogspot.com/-11uB_WeMP_E/UYz0voPsdSI/AAAAAAAABFA/l0porowM0rM/s1600/ketawa.gif' height='16'/>")
     d[i].innerHTML = d[i].innerHTML.replace (/\/omg/ig,"<img style='border: 0; padding:0'  src='http://2.bp.blogspot.com/-jOq-KNku7sw/UYz0w3d4tdI/AAAAAAAABFM/3jw_km0x8Ag/s1600/omg.gif' height='16'/>")
     d[i].innerHTML = d[i].innerHTML.replace (/\/no/ig,"<img style='border: 0; padding:0'  src='http://2.bp.blogspot.com/-LyoLM9HeOrk/UYz0wjzFnRI/AAAAAAAABFI/ySdD-nd2nnM/s1600/no.gif' height='16'/>")
     d[i].innerHTML = d[i].innerHTML.replace (/\/ingusan/ig,"<img style='border: 0; padding:0'  src='http://3.bp.blogspot.com/-UNkYYUhMaAs/UYz0uhAID_I/AAAAAAAABE8/YAzIyfBAr20/s1600/ingusan.gif' height='16'/>")
     d[i].innerHTML = d[i].innerHTML.replace (/\/panas/ig,"<img style='border: 0; padding:0'  src='http://1.bp.blogspot.com/-6s_CdnbzeXY/UYz0xDHmERI/AAAAAAAABFU/aR_KkXmY4Dw/s1600/panas.gif' height='16'/>")
     d[i].innerHTML = d[i].innerHTML.replace (/\/woe/ig,"<img style='border: 0; padding:0'  src='http://4.bp.blogspot.com/-hhao1Iak6-A/UYz0yb40C7I/AAAAAAAABFY/zQ_s0rnI8Vk/s1600/woe.gif' height='16'/>")
     d[i].innerHTML = d[i].innerHTML.replace (/\/berguling/ig,"<img style='border: 0; padding:0'  src='http://4.bp.blogspot.com/-A76prDrYjo4/UYz0ks_mCfI/AAAAAAAABEs/cc315I1qXFw/s1600/berguling.gif' height='16'/>")
     d[i].innerHTML = d[i].innerHTML.replace (/\/XD/ig,"<img style='border: 0; padding:0'  src='http://2.bp.blogspot.com/-j9CERSAlhKs/UYz0jNYA-0I/AAAAAAAABEo/O2BmmliCEJg/s1600/XD.gif' height='16'/>")
     d[i].innerHTML = d[i].innerHTML.replace (/\/hehe/ig,"<img style='border: 0; padding:0'  src='http://2.bp.blogspot.com/-_onQpXkQNNg/UYz0tgjUj6I/AAAAAAAABE4/V1lIjwf9eXM/s1600/hehe.gif' height='16'/>")
     d[i].innerHTML = d[i].innerHTML.replace (/\/hipnotis/ig,"<img style='border: 0; padding:0'  src='http://1.bp.blogspot.com/-UcOk6eC_hUQ/UYz0gbvQbQI/AAAAAAAABEk/4Lg-k8dhq2M/s1600/Hipnotis.gif' height='16'/>")
     d[i].innerHTML = d[i].innerHTML.replace (/\/sweet/ig,"<img style='border: 0; padding:0'  src='http://4.bp.blogspot.com/-9dzyHtg6a8A/UYz0xidUWrI/AAAAAAAABFQ/rxn6VNDz47k/s1600/sweet.gif' height='16'/>")
     d[i].innerHTML = d[i].innerHTML.replace (/\/bye/ig,"<img style='border: 0; padding:0'  src='http://2.bp.blogspot.com/-OUjonpaEo_k/UYz0gJuGsnI/AAAAAAAABEg/BXuDDEl_HQE/s1600/Bye.gif' height='16'/>")
     d[i].innerHTML = d[i].innerHTML.replace (/\/sedih/ig,"<img style='border: 0; padding:0'  src='http://1.bp.blogspot.com/-tPckamWY6ck/UYz0gkBBAuI/AAAAAAAABFE/SUVbEam74hE/s1600/Sedih.gif' height='16'/>")

    }
}

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

addLoadEvent(function(){
	addSmiley();
});